home *** CD-ROM | disk | FTP | other *** search
- ; Listing generated by Microsoft (R) Optimizing Compiler Version 13.10.4035
-
- TITLE .\showarcball.cpp
- .386P
- include listing.inc
- if @Version gt 510
- .model FLAT
- else
- _TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
- _TEXT ENDS
- _DATA SEGMENT DWORD USE32 PUBLIC 'DATA'
- _DATA ENDS
- CONST SEGMENT DWORD USE32 PUBLIC 'CONST'
- CONST ENDS
- _BSS SEGMENT DWORD USE32 PUBLIC 'BSS'
- _BSS ENDS
- $$SYMBOLS SEGMENT BYTE USE32 'DEBSYM'
- $$SYMBOLS ENDS
- _TLS SEGMENT DWORD USE32 PUBLIC 'TLS'
- _TLS ENDS
- ; COMDAT ??_C@_04JKCKMDGO@vClr?$AA@
- CONST SEGMENT DWORD USE32 PUBLIC 'CONST'
- CONST ENDS
- ; COMDAT ??0CShowArcball@@QAE@XZ
- _TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
- _TEXT ENDS
- ; COMDAT ??1CShowArcball@@QAE@XZ
- _TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
- _TEXT ENDS
- ; COMDAT ?Init@CShowArcball@@QAEJPAUIDirect3DDevice9@@K@Z
- _TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
- _TEXT ENDS
- ; COMDAT ?Draw@CShowArcball@@QAEJPAUID3DXEffect@@K@Z
- _TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
- _TEXT ENDS
- ; COMDAT ?CreateEmptyOutline@CShowArcball@@AAEJXZ
- _TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
- _TEXT ENDS
- ; COMDAT ??0D3DXCOLOR@@QAE@MMMM@Z
- _TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
- _TEXT ENDS
- ; COMDAT ??0D3DXCOLOR@@QAE@K@Z
- _TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
- _TEXT ENDS
- ; COMDAT _sinf
- _TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
- _TEXT ENDS
- ; COMDAT _cosf
- _TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
- _TEXT ENDS
- FLAT GROUP _DATA, CONST, _BSS
- ASSUME CS: FLAT, DS: FLAT, SS: FLAT
- endif
-
- INCLUDELIB LIBC
- INCLUDELIB OLDNAMES
-
- PUBLIC ??0CShowArcball@@QAE@XZ ; CShowArcball::CShowArcball
- ; Function compile flags: /Ogs
- ; File d:\builds\nt32_fre\multimedia\directx\dxsdk\src\mview\gxu\showarcball.cpp
- ; COMDAT ??0CShowArcball@@QAE@XZ
- _TEXT SEGMENT
- ??0CShowArcball@@QAE@XZ PROC NEAR ; CShowArcball::CShowArcball, COMDAT
- ; _this$ = ecx
-
- ; 30 : {
-
- 00000 8b c1 mov eax, ecx
- 00002 33 c9 xor ecx, ecx
- 00004 89 08 mov DWORD PTR [eax], ecx
- 00006 89 48 04 mov DWORD PTR [eax+4], ecx
- 00009 89 48 08 mov DWORD PTR [eax+8], ecx
-
- ; 31 : }
-
- 0000c c3 ret 0
- ??0CShowArcball@@QAE@XZ ENDP ; CShowArcball::CShowArcball
- _TEXT ENDS
- PUBLIC ??1CShowArcball@@QAE@XZ ; CShowArcball::~CShowArcball
- ; Function compile flags: /Ogs
- ; COMDAT ??1CShowArcball@@QAE@XZ
- _TEXT SEGMENT
- ??1CShowArcball@@QAE@XZ PROC NEAR ; CShowArcball::~CShowArcball, COMDAT
- ; _this$ = ecx
-
- ; 37 : }
-
- 00000 8b ff npad 2
- 00002 56 push esi
-
- ; 34 : {
-
- 00003 8b f1 mov esi, ecx
-
- ; 35 : GXRELEASE(m_pVertexBuffer);
-
- 00005 8b 46 04 mov eax, DWORD PTR [esi+4]
- 00008 85 c0 test eax, eax
- 0000a 74 0a je SHORT $L56238
- 0000c 8b 08 mov ecx, DWORD PTR [eax]
- 0000e 50 push eax
- 0000f ff 51 08 call DWORD PTR [ecx+8]
- 00012 83 66 04 00 and DWORD PTR [esi+4], 0
- $L56238:
-
- ; 36 : GXRELEASE(m_pDevice);
-
- 00016 8b 06 mov eax, DWORD PTR [esi]
- 00018 85 c0 test eax, eax
- 0001a 74 09 je SHORT $L56242
- 0001c 8b 08 mov ecx, DWORD PTR [eax]
- 0001e 50 push eax
- 0001f ff 51 08 call DWORD PTR [ecx+8]
- 00022 83 26 00 and DWORD PTR [esi], 0
- $L56242:
- 00025 5e pop esi
-
- ; 37 : }
-
- 00026 c3 ret 0
- ??1CShowArcball@@QAE@XZ ENDP ; CShowArcball::~CShowArcball
- _TEXT ENDS
- PUBLIC ?CreateEmptyOutline@CShowArcball@@AAEJXZ ; CShowArcball::CreateEmptyOutline
- ; Function compile flags: /Ogs
- ; COMDAT ?CreateEmptyOutline@CShowArcball@@AAEJXZ
- _TEXT SEGMENT
- ?CreateEmptyOutline@CShowArcball@@AAEJXZ PROC NEAR ; CShowArcball::CreateEmptyOutline, COMDAT
- ; _this$ = ecx
-
- ; 155 : }
-
- 00000 8b ff npad 2
- 00002 56 push esi
-
- ; 148 : {
-
- 00003 8b f1 mov esi, ecx
-
- ; 149 : m_cSegments = 0;
- ; 150 :
- ; 151 : GXRELEASE(m_pVertexBuffer);
-
- 00005 8b 46 04 mov eax, DWORD PTR [esi+4]
- 00008 83 66 08 00 and DWORD PTR [esi+8], 0
- 0000c 85 c0 test eax, eax
- 0000e 74 0a je SHORT $L56312
- 00010 8b 08 mov ecx, DWORD PTR [eax]
- 00012 50 push eax
- 00013 ff 51 08 call DWORD PTR [ecx+8]
- 00016 83 66 04 00 and DWORD PTR [esi+4], 0
- $L56312:
-
- ; 152 : GXRELEASE(m_pDevice);
-
- 0001a 8b 06 mov eax, DWORD PTR [esi]
- 0001c 85 c0 test eax, eax
- 0001e 74 09 je SHORT $L56316
- 00020 8b 08 mov ecx, DWORD PTR [eax]
- 00022 50 push eax
- 00023 ff 51 08 call DWORD PTR [ecx+8]
- 00026 83 26 00 and DWORD PTR [esi], 0
- $L56316:
-
- ; 153 :
- ; 154 : return S_OK;
-
- 00029 33 c0 xor eax, eax
- 0002b 5e pop esi
-
- ; 155 : }
-
- 0002c c3 ret 0
- ?CreateEmptyOutline@CShowArcball@@AAEJXZ ENDP ; CShowArcball::CreateEmptyOutline
- _TEXT ENDS
- PUBLIC _cosf
- EXTRN __fltused:NEAR
- ; Function compile flags: /Ogs
- ; File d:\builds\nt32_fre\public\sdk\inc\crt\math.h
- ; COMDAT _cosf
- _TEXT SEGMENT
- __X$ = 8 ; size = 4
- _cosf PROC NEAR ; COMDAT
-
- ; 432 : {return ((float)cos((double)_X)); }
-
- 00000 8b ff npad 2
- 00002 55 push ebp
- 00003 8b ec mov ebp, esp
- 00005 d9 45 08 fld DWORD PTR __X$[ebp]
- 00008 d9 ff fcos
- 0000a 5d pop ebp
- 0000b c3 ret 0
- _cosf ENDP
- _TEXT ENDS
- PUBLIC _sinf
- ; Function compile flags: /Ogs
- ; COMDAT _sinf
- _TEXT SEGMENT
- __X$ = 8 ; size = 4
- _sinf PROC NEAR ; COMDAT
-
- ; 454 : {return ((float)sin((double)_X)); }
-
- 00000 8b ff npad 2
- 00002 55 push ebp
- 00003 8b ec mov ebp, esp
- 00005 d9 45 08 fld DWORD PTR __X$[ebp]
- 00008 d9 fe fsin
- 0000a 5d pop ebp
- 0000b c3 ret 0
- _sinf ENDP
- _TEXT ENDS
- PUBLIC __real@3b808081
- PUBLIC ??0D3DXCOLOR@@QAE@K@Z ; D3DXCOLOR::D3DXCOLOR
- ; COMDAT __real@3b808081
- ; File d:\builds\nt32_fre\public\sdk\inc\d3dx9math.inl
- CONST SEGMENT
- __real@3b808081 DD 03b808081r ; 0.00392157
- ; Function compile flags: /Ogs
- CONST ENDS
- ; COMDAT ??0D3DXCOLOR@@QAE@K@Z
- _TEXT SEGMENT
- tv186 = 8 ; size = 4
- tv185 = 8 ; size = 4
- tv184 = 8 ; size = 4
- tv183 = 8 ; size = 4
- _dw$ = 8 ; size = 4
- ??0D3DXCOLOR@@QAE@K@Z PROC NEAR ; D3DXCOLOR::D3DXCOLOR, COMDAT
- ; _this$ = ecx
-
- ; 1352 : }
-
- 00000 8b ff npad 2
-
- ; 1346 : {
-
- 00002 55 push ebp
- 00003 8b ec mov ebp, esp
-
- ; 1347 : CONST FLOAT f = 1.0f / 255.0f;
- ; 1348 : r = f * (FLOAT) (unsigned char) (dw >> 16);
-
- 00005 d9 05 00 00 00
- 00 fld DWORD PTR __real@3b808081
- 0000b 8b c1 mov eax, ecx
- 0000d 8b 4d 08 mov ecx, DWORD PTR _dw$[ebp]
- 00010 8b d1 mov edx, ecx
- 00012 c1 ea 10 shr edx, 16 ; 00000010H
- 00015 0f b6 d2 movzx edx, dl
- 00018 89 55 08 mov DWORD PTR tv186[ebp], edx
-
- ; 1349 : g = f * (FLOAT) (unsigned char) (dw >> 8);
-
- 0001b 8b d1 mov edx, ecx
- 0001d c1 ea 08 shr edx, 8
- 00020 db 45 08 fild DWORD PTR tv186[ebp]
- 00023 0f b6 d2 movzx edx, dl
- 00026 d8 c9 fmul ST(0), ST(1)
- 00028 89 55 08 mov DWORD PTR tv185[ebp], edx
-
- ; 1350 : b = f * (FLOAT) (unsigned char) (dw >> 0);
-
- 0002b 0f b6 d1 movzx edx, cl
- 0002e d9 18 fstp DWORD PTR [eax]
- 00030 db 45 08 fild DWORD PTR tv185[ebp]
- 00033 89 55 08 mov DWORD PTR tv184[ebp], edx
-
- ; 1351 : a = f * (FLOAT) (unsigned char) (dw >> 24);
-
- 00036 c1 e9 18 shr ecx, 24 ; 00000018H
- 00039 d8 c9 fmul ST(0), ST(1)
- 0003b d9 58 04 fstp DWORD PTR [eax+4]
- 0003e db 45 08 fild DWORD PTR tv184[ebp]
- 00041 89 4d 08 mov DWORD PTR tv183[ebp], ecx
- 00044 d8 c9 fmul ST(0), ST(1)
- 00046 d9 58 08 fstp DWORD PTR [eax+8]
- 00049 db 45 08 fild DWORD PTR tv183[ebp]
- 0004c d8 c9 fmul ST(0), ST(1)
- 0004e d9 58 0c fstp DWORD PTR [eax+12]
- 00051 dd d8 fstp ST(0)
-
- ; 1352 : }
-
- 00053 5d pop ebp
- 00054 c2 04 00 ret 4
- ??0D3DXCOLOR@@QAE@K@Z ENDP ; D3DXCOLOR::D3DXCOLOR
- _TEXT ENDS
- PUBLIC ??0D3DXCOLOR@@QAE@MMMM@Z ; D3DXCOLOR::D3DXCOLOR
- ; Function compile flags: /Ogs
- ; COMDAT ??0D3DXCOLOR@@QAE@MMMM@Z
- _TEXT SEGMENT
- _fr$ = 8 ; size = 4
- _fg$ = 12 ; size = 4
- _fb$ = 16 ; size = 4
- _fa$ = 20 ; size = 4
- ??0D3DXCOLOR@@QAE@MMMM@Z PROC NEAR ; D3DXCOLOR::D3DXCOLOR, COMDAT
- ; _this$ = ecx
-
- ; 1395 : }
-
- 00000 8b ff npad 2
-
- ; 1390 : {
-
- 00002 55 push ebp
- 00003 8b ec mov ebp, esp
- 00005 8b c1 mov eax, ecx
-
- ; 1391 : r = fr;
-
- 00007 8b 4d 08 mov ecx, DWORD PTR _fr$[ebp]
- 0000a 89 08 mov DWORD PTR [eax], ecx
-
- ; 1392 : g = fg;
-
- 0000c 8b 4d 0c mov ecx, DWORD PTR _fg$[ebp]
- 0000f 89 48 04 mov DWORD PTR [eax+4], ecx
-
- ; 1393 : b = fb;
-
- 00012 8b 4d 10 mov ecx, DWORD PTR _fb$[ebp]
- 00015 89 48 08 mov DWORD PTR [eax+8], ecx
-
- ; 1394 : a = fa;
-
- 00018 8b 4d 14 mov ecx, DWORD PTR _fa$[ebp]
- 0001b 89 48 0c mov DWORD PTR [eax+12], ecx
-
- ; 1395 : }
-
- 0001e 5d pop ebp
- 0001f c2 10 00 ret 16 ; 00000010H
- ??0D3DXCOLOR@@QAE@MMMM@Z ENDP ; D3DXCOLOR::D3DXCOLOR
- _TEXT ENDS
- PUBLIC __real@40c90fd8
- PUBLIC __real@4f800000
- PUBLIC ?Init@CShowArcball@@QAEJPAUIDirect3DDevice9@@K@Z ; CShowArcball::Init
- ; COMDAT __real@40c90fd8
- ; File d:\builds\nt32_fre\public\sdk\inc\crt\math.h
- CONST SEGMENT
- __real@40c90fd8 DD 040c90fd8r ; 6.28318
- CONST ENDS
- ; COMDAT __real@4f800000
- CONST SEGMENT
- __real@4f800000 DD 04f800000r ; 4.29497e+009
- ; Function compile flags: /Ogs
- ; File d:\builds\nt32_fre\multimedia\directx\dxsdk\src\mview\gxu\showarcball.cpp
- CONST ENDS
- ; COMDAT ?Init@CShowArcball@@QAEJPAUIDirect3DDevice9@@K@Z
- _TEXT SEGMENT
- _hr$ = -8 ; size = 4
- _rgvDest$ = -4 ; size = 4
- tv447 = 8 ; size = 4
- tv444 = 8 ; size = 4
- tv428 = 8 ; size = 4
- tv425 = 8 ; size = 4
- _iSegment$ = 8 ; size = 4
- _pDevice$ = 8 ; size = 4
- tv438 = 12 ; size = 4
- tv433 = 12 ; size = 4
- _cSegments$ = 12 ; size = 4
- ?Init@CShowArcball@@QAEJPAUIDirect3DDevice9@@K@Z PROC NEAR ; CShowArcball::Init, COMDAT
- ; _this$ = ecx
-
- ; 100 : }
-
- 00000 8b ff npad 2
-
- ; 45 : {
-
- 00002 55 push ebp
- 00003 8b ec mov ebp, esp
- 00005 51 push ecx
- 00006 51 push ecx
-
- ; 46 : HRESULT hr;
- ; 47 : DWORD iSegment;
- ; 48 : D3DXVECTOR3 *rgvDest = NULL;
-
- 00007 83 65 fc 00 and DWORD PTR _rgvDest$[ebp], 0
- 0000b 53 push ebx
- 0000c 56 push esi
- 0000d 57 push edi
- 0000e 8b f9 mov edi, ecx
-
- ; 49 :
- ; 50 : hr = CreateEmptyOutline();
-
- 00010 e8 00 00 00 00 call ?CreateEmptyOutline@CShowArcball@@AAEJXZ ; CShowArcball::CreateEmptyOutline
-
- ; 51 : if (FAILED(hr))
-
- 00015 85 c0 test eax, eax
- 00017 89 45 f8 mov DWORD PTR _hr$[ebp], eax
- 0001a 0f 8c 77 01 00
- 00 jl $e_Exit$56255
-
- ; 52 : goto e_Exit;
- ; 53 :
- ; 54 : m_pDevice = pDevice;
-
- 00020 8b 45 08 mov eax, DWORD PTR _pDevice$[ebp]
- 00023 89 07 mov DWORD PTR [edi], eax
-
- ; 55 : m_pDevice->AddRef();
-
- 00025 8b 08 mov ecx, DWORD PTR [eax]
- 00027 50 push eax
- 00028 ff 51 04 call DWORD PTR [ecx+4]
-
- ; 56 :
- ; 57 : m_cSegments = cSegments;
-
- 0002b 8b 75 0c mov esi, DWORD PTR _cSegments$[ebp]
-
- ; 58 :
- ; 59 : hr = m_pDevice->CreateVertexBuffer(sizeof(D3DXVECTOR3) * (cSegments+1) * 3,
- ; 60 : D3DUSAGE_WRITEONLY,
- ; 61 : D3DFVF_XYZ, D3DPOOL_MANAGED, &m_pVertexBuffer, NULL);
-
- 0002e 8b 07 mov eax, DWORD PTR [edi]
- 00030 6a 00 push 0
- 00032 8d 5f 04 lea ebx, DWORD PTR [edi+4]
- 00035 53 push ebx
- 00036 6a 01 push 1
- 00038 6a 02 push 2
- 0003a 6a 08 push 8
- 0003c 8d 54 f6 09 lea edx, DWORD PTR [esi+esi*8+9]
- 00040 c1 e2 02 shl edx, 2
- 00043 52 push edx
- 00044 89 77 08 mov DWORD PTR [edi+8], esi
- 00047 8b 08 mov ecx, DWORD PTR [eax]
- 00049 50 push eax
- 0004a ff 51 68 call DWORD PTR [ecx+104]
-
- ; 62 : if (FAILED(hr))
-
- 0004d 85 c0 test eax, eax
- 0004f 89 45 f8 mov DWORD PTR _hr$[ebp], eax
- 00052 0f 8c 3f 01 00
- 00 jl $e_Exit$56255
-
- ; 63 : goto e_Exit;
- ; 64 :
- ; 65 :
- ; 66 : hr = m_pVertexBuffer->Lock(0,0, (PVOID*)&rgvDest, D3DLOCK_NOSYSLOCK);
-
- 00058 8b 1b mov ebx, DWORD PTR [ebx]
- 0005a 8b 03 mov eax, DWORD PTR [ebx]
- 0005c 68 00 08 00 00 push 2048 ; 00000800H
- 00061 8d 4d fc lea ecx, DWORD PTR _rgvDest$[ebp]
- 00064 51 push ecx
- 00065 6a 00 push 0
- 00067 6a 00 push 0
- 00069 53 push ebx
- 0006a ff 50 2c call DWORD PTR [eax+44]
-
- ; 67 : if (FAILED(hr))
-
- 0006d 85 c0 test eax, eax
- 0006f 89 45 f8 mov DWORD PTR _hr$[ebp], eax
- 00072 0f 8c 1f 01 00
- 00 jl $e_Exit$56255
-
- ; 68 : goto e_Exit;
- ; 69 :
- ; 70 : for (iSegment = 0; iSegment < cSegments+1; iSegment++)
-
- 00078 d9 05 00 00 00
- 00 fld DWORD PTR __real@40c90fd8
- 0007e 8d 56 01 lea edx, DWORD PTR [esi+1]
- 00081 33 c9 xor ecx, ecx
- 00083 85 d2 test edx, edx
- 00085 76 4c jbe SHORT $L56267
- 00087 85 f6 test esi, esi
- 00089 89 75 08 mov DWORD PTR tv447[ebp], esi
- 0008c db 45 08 fild DWORD PTR tv447[ebp]
- 0008f 7d 06 jge SHORT $L56382
- 00091 d8 05 00 00 00
- 00 fadd DWORD PTR __real@4f800000
- $L56382:
- 00097 33 c0 xor eax, eax
- $L56265:
-
- ; 71 : {
- ; 72 : rgvDest[iSegment].x = cosf(PI*2 * ((float)iSegment/(float)cSegments));
-
- 00099 85 c9 test ecx, ecx
- 0009b 89 4d 08 mov DWORD PTR tv444[ebp], ecx
- 0009e db 45 08 fild DWORD PTR tv444[ebp]
- 000a1 7d 06 jge SHORT $L56385
- 000a3 d8 05 00 00 00
- 00 fadd DWORD PTR __real@4f800000
- $L56385:
- 000a9 d8 f1 fdiv ST(0), ST(1)
- 000ab 8b 5d fc mov ebx, DWORD PTR _rgvDest$[ebp]
- 000ae 41 inc ecx
- 000af d8 ca fmul ST(0), ST(2)
- 000b1 d9 c0 fld ST(0)
- 000b3 d9 ff fcos
- 000b5 d9 1c 18 fstp DWORD PTR [eax+ebx]
-
- ; 73 : rgvDest[iSegment].y = sinf(PI*2 * ((float)iSegment/(float)cSegments));
-
- 000b8 8b 5d fc mov ebx, DWORD PTR _rgvDest$[ebp]
- 000bb d9 fe fsin
- 000bd 83 c0 0c add eax, 12 ; 0000000cH
- 000c0 3b ca cmp ecx, edx
- 000c2 d9 5c 18 f8 fstp DWORD PTR [eax+ebx-8]
-
- ; 74 : rgvDest[iSegment].z = 0.0f;
-
- 000c6 8b 5d fc mov ebx, DWORD PTR _rgvDest$[ebp]
- 000c9 d9 ee fldz
- 000cb d9 5c 18 fc fstp DWORD PTR [eax+ebx-4]
- 000cf 72 c8 jb SHORT $L56265
- 000d1 dd d8 fstp ST(0)
- $L56267:
-
- ; 75 : }
- ; 76 :
- ; 77 : rgvDest += cSegments+1;
-
- 000d3 8b 4d fc mov ecx, DWORD PTR _rgvDest$[ebp]
- 000d6 8d 04 76 lea eax, DWORD PTR [esi+esi*2]
- 000d9 c1 e0 02 shl eax, 2
- 000dc 8d 4c 01 0c lea ecx, DWORD PTR [ecx+eax+12]
- 000e0 89 4d fc mov DWORD PTR _rgvDest$[ebp], ecx
-
- ; 78 : for (iSegment = 0; iSegment < cSegments+1; iSegment++)
-
- 000e3 33 c9 xor ecx, ecx
- 000e5 3b d1 cmp edx, ecx
- 000e7 89 4d 08 mov DWORD PTR _iSegment$[ebp], ecx
- 000ea 76 4d jbe SHORT $L56274
- 000ec 85 f6 test esi, esi
- 000ee 89 75 0c mov DWORD PTR tv438[ebp], esi
- 000f1 db 45 0c fild DWORD PTR tv438[ebp]
- 000f4 7d 06 jge SHORT $L56377
- 000f6 d8 05 00 00 00
- 00 fadd DWORD PTR __real@4f800000
- $L56377:
-
- ; 79 : {
- ; 80 : rgvDest[iSegment].x = 0.0f;
-
- 000fc 8b 5d fc mov ebx, DWORD PTR _rgvDest$[ebp]
- 000ff d9 ee fldz
- 00101 d9 1c 19 fstp DWORD PTR [ecx+ebx]
-
- ; 81 : rgvDest[iSegment].y = cosf(PI*2 * ((float)iSegment/(float)cSegments));
-
- 00104 8b 5d 08 mov ebx, DWORD PTR _iSegment$[ebp]
- 00107 db 45 08 fild DWORD PTR _iSegment$[ebp]
- 0010a 85 db test ebx, ebx
- 0010c 7d 06 jge SHORT $L56387
- 0010e d8 05 00 00 00
- 00 fadd DWORD PTR __real@4f800000
- $L56387:
- 00114 d8 f1 fdiv ST(0), ST(1)
- 00116 8b 5d fc mov ebx, DWORD PTR _rgvDest$[ebp]
- 00119 ff 45 08 inc DWORD PTR _iSegment$[ebp]
- 0011c 83 c1 0c add ecx, 12 ; 0000000cH
- 0011f 39 55 08 cmp DWORD PTR _iSegment$[ebp], edx
- 00122 d8 ca fmul ST(0), ST(2)
- 00124 d9 c0 fld ST(0)
- 00126 d9 ff fcos
- 00128 d9 5c 19 f8 fstp DWORD PTR [ecx+ebx-8]
-
- ; 82 : rgvDest[iSegment].z = sinf(PI*2 * ((float)iSegment/(float)cSegments));
-
- 0012c 8b 5d fc mov ebx, DWORD PTR _rgvDest$[ebp]
- 0012f d9 fe fsin
- 00131 d9 5c 19 fc fstp DWORD PTR [ecx+ebx-4]
- 00135 72 c5 jb SHORT $L56377
- 00137 dd d8 fstp ST(0)
- $L56274:
-
- ; 83 : }
- ; 84 :
- ; 85 : rgvDest += cSegments+1;
-
- 00139 8b 4d fc mov ecx, DWORD PTR _rgvDest$[ebp]
- 0013c 8d 44 01 0c lea eax, DWORD PTR [ecx+eax+12]
-
- ; 86 : for (iSegment = 0; iSegment < cSegments+1; iSegment++)
-
- 00140 33 c9 xor ecx, ecx
- 00142 85 d2 test edx, edx
- 00144 89 45 fc mov DWORD PTR _rgvDest$[ebp], eax
- 00147 76 4c jbe SHORT $L56380
- 00149 85 f6 test esi, esi
- 0014b 89 75 08 mov DWORD PTR tv428[ebp], esi
- 0014e db 45 08 fild DWORD PTR tv428[ebp]
- 00151 7d 06 jge SHORT $L56388
- 00153 d8 05 00 00 00
- 00 fadd DWORD PTR __real@4f800000
- $L56388:
-
- ; 83 : }
- ; 84 :
- ; 85 : rgvDest += cSegments+1;
-
- 00159 33 c0 xor eax, eax
- $L56378:
-
- ; 87 : {
- ; 88 : rgvDest[iSegment].x = cosf(PI*2 * ((float)iSegment/(float)cSegments));
-
- 0015b 85 c9 test ecx, ecx
- 0015d 89 4d 08 mov DWORD PTR tv425[ebp], ecx
- 00160 db 45 08 fild DWORD PTR tv425[ebp]
- 00163 7d 06 jge SHORT $L56389
- 00165 d8 05 00 00 00
- 00 fadd DWORD PTR __real@4f800000
- $L56389:
- 0016b d8 f1 fdiv ST(0), ST(1)
- 0016d 8b 75 fc mov esi, DWORD PTR _rgvDest$[ebp]
- 00170 41 inc ecx
- 00171 d8 ca fmul ST(0), ST(2)
- 00173 d9 c0 fld ST(0)
- 00175 d9 ff fcos
- 00177 d9 1c 30 fstp DWORD PTR [eax+esi]
-
- ; 89 : rgvDest[iSegment].y = 0.0f;
-
- 0017a 8b 75 fc mov esi, DWORD PTR _rgvDest$[ebp]
- 0017d d9 ee fldz
- 0017f d9 5c 30 04 fstp DWORD PTR [eax+esi+4]
-
- ; 90 : rgvDest[iSegment].z = sinf(PI*2 * ((float)iSegment/(float)cSegments));
-
- 00183 8b 75 fc mov esi, DWORD PTR _rgvDest$[ebp]
- 00186 83 c0 0c add eax, 12 ; 0000000cH
- 00189 3b ca cmp ecx, edx
- 0018b d9 fe fsin
- 0018d d9 5c 30 fc fstp DWORD PTR [eax+esi-4]
- 00191 72 c8 jb SHORT $L56378
- 00193 dd d8 fstp ST(0)
- $L56380:
-
- ; 82 : rgvDest[iSegment].z = sinf(PI*2 * ((float)iSegment/(float)cSegments));
-
- 00195 dd d8 fstp ST(0)
- $e_Exit$56255:
-
- ; 91 : }
- ; 92 :
- ; 93 : e_Exit:
- ; 94 : if (rgvDest != NULL)
-
- 00197 83 7d fc 00 cmp DWORD PTR _rgvDest$[ebp], 0
- 0019b 74 09 je SHORT $L56286
-
- ; 95 : {
- ; 96 : m_pVertexBuffer->Unlock();
-
- 0019d 8b 7f 04 mov edi, DWORD PTR [edi+4]
- 001a0 8b 07 mov eax, DWORD PTR [edi]
- 001a2 57 push edi
- 001a3 ff 50 30 call DWORD PTR [eax+48]
- $L56286:
-
- ; 97 : }
- ; 98 :
- ; 99 : return hr;
-
- 001a6 8b 45 f8 mov eax, DWORD PTR _hr$[ebp]
- 001a9 5f pop edi
- 001aa 5e pop esi
- 001ab 5b pop ebx
-
- ; 100 : }
-
- 001ac c9 leave
- 001ad c2 08 00 ret 8
- ?Init@CShowArcball@@QAEJPAUIDirect3DDevice9@@K@Z ENDP ; CShowArcball::Init
- _TEXT ENDS
- PUBLIC __real@3e4ccccd
- PUBLIC ?Draw@CShowArcball@@QAEJPAUID3DXEffect@@K@Z ; CShowArcball::Draw
- PUBLIC ??_C@_04JKCKMDGO@vClr?$AA@ ; `string'
- ; COMDAT __real@3e4ccccd
- ; File d:\builds\nt32_fre\public\sdk\inc\d3dx9math.inl
- CONST SEGMENT
- __real@3e4ccccd DD 03e4ccccdr ; 0.2
- CONST ENDS
- ; COMDAT ??_C@_04JKCKMDGO@vClr?$AA@
- CONST SEGMENT
- ??_C@_04JKCKMDGO@vClr?$AA@ DB 'vClr', 00H ; `string'
- ; Function compile flags: /Ogs
- ; File d:\builds\nt32_fre\multimedia\directx\dxsdk\src\mview\gxu\showarcball.cpp
- CONST ENDS
- ; COMDAT ?Draw@CShowArcball@@QAEJPAUID3DXEffect@@K@Z
- _TEXT SEGMENT
- $T56393 = -68 ; size = 16
- $T56392 = -52 ; size = 16
- $T56391 = -36 ; size = 16
- _vClr$ = -20 ; size = 16
- _cPasses$ = -4 ; size = 4
- _pfxColor$ = 8 ; size = 4
- tv361 = 12 ; size = 4
- tv360 = 12 ; size = 4
- tv359 = 12 ; size = 4
- tv358 = 12 ; size = 4
- _iPass$ = 12 ; size = 4
- _dwColor$ = 12 ; size = 4
- ?Draw@CShowArcball@@QAEJPAUID3DXEffect@@K@Z PROC NEAR ; CShowArcball::Draw, COMDAT
- ; _this$ = ecx
-
- ; 144 : }
-
- 00000 8b ff npad 2
-
- ; 108 : {
-
- 00002 55 push ebp
- 00003 8b ec mov ebp, esp
- 00005 83 ec 44 sub esp, 68 ; 00000044H
-
- ; 109 : HRESULT hr;
- ; 110 : UINT iPass;
- ; 111 : UINT cPasses;
- ; 112 : D3DXCOLOR vClr(dwColor);
-
- 00008 8b 45 0c mov eax, DWORD PTR _dwColor$[ebp]
- 0000b d9 05 00 00 00
- 00 fld DWORD PTR __real@3b808081
- 00011 53 push ebx
- 00012 8b d9 mov ebx, ecx
- 00014 8b c8 mov ecx, eax
- 00016 c1 e9 10 shr ecx, 16 ; 00000010H
- 00019 0f b6 c9 movzx ecx, cl
- 0001c 89 4d 0c mov DWORD PTR tv361[ebp], ecx
- 0001f 8b c8 mov ecx, eax
- 00021 c1 e9 08 shr ecx, 8
- 00024 db 45 0c fild DWORD PTR tv361[ebp]
- 00027 0f b6 c9 movzx ecx, cl
- 0002a d8 c9 fmul ST(0), ST(1)
- 0002c 89 4d 0c mov DWORD PTR tv360[ebp], ecx
- 0002f 0f b6 c8 movzx ecx, al
- 00032 d9 5d ec fstp DWORD PTR _vClr$[ebp]
- 00035 db 45 0c fild DWORD PTR tv360[ebp]
- 00038 89 4d 0c mov DWORD PTR tv359[ebp], ecx
- 0003b c1 e8 18 shr eax, 24 ; 00000018H
- 0003e 56 push esi
-
- ; 113 :
- ; 114 : pfxColor->Begin(&cPasses, 0);
-
- 0003f 8b 75 08 mov esi, DWORD PTR _pfxColor$[ebp]
- 00042 d8 c9 fmul ST(0), ST(1)
- 00044 57 push edi
- 00045 33 ff xor edi, edi
- 00047 d9 5d f0 fstp DWORD PTR _vClr$[ebp+4]
- 0004a 57 push edi
- 0004b db 45 0c fild DWORD PTR tv359[ebp]
- 0004e 89 45 0c mov DWORD PTR tv358[ebp], eax
- 00051 8b 06 mov eax, DWORD PTR [esi]
- 00053 8d 4d fc lea ecx, DWORD PTR _cPasses$[ebp]
- 00056 d8 c9 fmul ST(0), ST(1)
- 00058 51 push ecx
- 00059 56 push esi
- 0005a d9 5d f4 fstp DWORD PTR _vClr$[ebp+8]
- 0005d db 45 0c fild DWORD PTR tv358[ebp]
- 00060 d8 c9 fmul ST(0), ST(1)
- 00062 d9 5d f8 fstp DWORD PTR _vClr$[ebp+12]
- 00065 dd d8 fstp ST(0)
- 00067 ff 90 04 01 00
- 00 call DWORD PTR [eax+260]
-
- ; 115 :
- ; 116 : for (iPass = 0; iPass < cPasses; iPass++)
-
- 0006d 39 7d fc cmp DWORD PTR _cPasses$[ebp], edi
- 00070 89 7d 0c mov DWORD PTR _iPass$[ebp], edi
- 00073 0f 86 15 01 00
- 00 jbe $L56298
-
- ; 123 :
- ; 124 : vClr = D3DXCOLOR(1.0f, 0.2f, 0.2f, 1.0f);
-
- 00079 d9 e8 fld1
- 0007b d9 5d dc fstp DWORD PTR $T56391[ebp]
- 0007e d9 05 00 00 00
- 00 fld DWORD PTR __real@3e4ccccd
- 00084 d9 55 e0 fst DWORD PTR $T56391[ebp+4]
- 00087 d9 55 e4 fst DWORD PTR $T56391[ebp+8]
- 0008a d9 e8 fld1
- 0008c d9 5d e8 fstp DWORD PTR $T56391[ebp+12]
-
- ; 128 :
- ; 129 : vClr = D3DXCOLOR(0.2f, 1.0f, 0.2f, 1.0f);
-
- 0008f d9 55 cc fst DWORD PTR $T56392[ebp]
- 00092 d9 e8 fld1
- 00094 d9 5d d0 fstp DWORD PTR $T56392[ebp+4]
- 00097 d9 55 d4 fst DWORD PTR $T56392[ebp+8]
- 0009a d9 e8 fld1
- 0009c d9 5d d8 fstp DWORD PTR $T56392[ebp+12]
-
- ; 133 :
- ; 134 : vClr = D3DXCOLOR(0.2f, 0.2f, 1.0f, 1.0f);
-
- 0009f d9 55 bc fst DWORD PTR $T56393[ebp]
- 000a2 d9 5d c0 fstp DWORD PTR $T56393[ebp+4]
- 000a5 d9 e8 fld1
- 000a7 d9 5d c4 fstp DWORD PTR $T56393[ebp+8]
- 000aa d9 e8 fld1
- 000ac d9 5d c8 fstp DWORD PTR $T56393[ebp+12]
- 000af eb 02 jmp SHORT $L56296
- $L56411:
- 000b1 33 ff xor edi, edi
- $L56296:
-
- ; 117 : {
- ; 118 : m_pDevice->SetFVF(D3DFVF_XYZ);
-
- 000b3 8b 03 mov eax, DWORD PTR [ebx]
- 000b5 8b 08 mov ecx, DWORD PTR [eax]
- 000b7 6a 02 push 2
- 000b9 50 push eax
- 000ba ff 91 64 01 00
- 00 call DWORD PTR [ecx+356]
-
- ; 119 :
- ; 120 : pfxColor->BeginPass(iPass);
-
- 000c0 ff 75 0c push DWORD PTR _iPass$[ebp]
- 000c3 8b 06 mov eax, DWORD PTR [esi]
- 000c5 56 push esi
- 000c6 ff 90 08 01 00
- 00 call DWORD PTR [eax+264]
-
- ; 121 :
- ; 122 : m_pDevice->SetStreamSource(0, m_pVertexBuffer, 0, sizeof(D3DXVECTOR3));
-
- 000cc 8b 03 mov eax, DWORD PTR [ebx]
- 000ce 8b 08 mov ecx, DWORD PTR [eax]
- 000d0 6a 0c push 12 ; 0000000cH
- 000d2 57 push edi
- 000d3 ff 73 04 push DWORD PTR [ebx+4]
- 000d6 57 push edi
- 000d7 50 push eax
- 000d8 ff 91 90 01 00
- 00 call DWORD PTR [ecx+400]
-
- ; 125 : pfxColor->SetVector("vClr", (D3DXVECTOR4*)&vClr);
-
- 000de 8b 45 08 mov eax, DWORD PTR _pfxColor$[ebp]
- 000e1 8b 08 mov ecx, DWORD PTR [eax]
- 000e3 8d 75 dc lea esi, DWORD PTR $T56391[ebp]
- 000e6 8d 7d ec lea edi, DWORD PTR _vClr$[ebp]
- 000e9 a5 movsd
- 000ea a5 movsd
- 000eb 8d 55 ec lea edx, DWORD PTR _vClr$[ebp]
- 000ee 52 push edx
- 000ef a5 movsd
- 000f0 68 00 00 00 00 push OFFSET FLAT:??_C@_04JKCKMDGO@vClr?$AA@
- 000f5 50 push eax
- 000f6 a5 movsd
- 000f7 ff 91 88 00 00
- 00 call DWORD PTR [ecx+136]
-
- ; 126 : hr = m_pDevice->DrawPrimitive(D3DPT_LINESTRIP,
- ; 127 : 0, m_cSegments);
-
- 000fd ff 73 08 push DWORD PTR [ebx+8]
- 00100 8b 03 mov eax, DWORD PTR [ebx]
- 00102 8b 08 mov ecx, DWORD PTR [eax]
- 00104 6a 00 push 0
- 00106 6a 03 push 3
- 00108 50 push eax
- 00109 ff 91 44 01 00
- 00 call DWORD PTR [ecx+324]
-
- ; 130 : pfxColor->SetVector("vClr", (D3DXVECTOR4*)&vClr);
-
- 0010f 8b 45 08 mov eax, DWORD PTR _pfxColor$[ebp]
- 00112 8b 08 mov ecx, DWORD PTR [eax]
- 00114 8d 75 cc lea esi, DWORD PTR $T56392[ebp]
- 00117 8d 7d ec lea edi, DWORD PTR _vClr$[ebp]
- 0011a a5 movsd
- 0011b a5 movsd
- 0011c 8d 55 ec lea edx, DWORD PTR _vClr$[ebp]
- 0011f 52 push edx
- 00120 a5 movsd
- 00121 68 00 00 00 00 push OFFSET FLAT:??_C@_04JKCKMDGO@vClr?$AA@
- 00126 50 push eax
- 00127 a5 movsd
- 00128 ff 91 88 00 00
- 00 call DWORD PTR [ecx+136]
-
- ; 131 : hr = m_pDevice->DrawPrimitive(D3DPT_LINESTRIP,
- ; 132 : m_cSegments + 1, m_cSegments);
-
- 0012e 8b 4b 08 mov ecx, DWORD PTR [ebx+8]
- 00131 8b 03 mov eax, DWORD PTR [ebx]
- 00133 8b 10 mov edx, DWORD PTR [eax]
- 00135 51 push ecx
- 00136 41 inc ecx
- 00137 51 push ecx
- 00138 6a 03 push 3
- 0013a 50 push eax
- 0013b ff 92 44 01 00
- 00 call DWORD PTR [edx+324]
-
- ; 133 :
- ; 134 : vClr = D3DXCOLOR(0.2f, 0.2f, 1.0f, 1.0f);
-
- 00141 8d 75 bc lea esi, DWORD PTR $T56393[ebp]
- 00144 8d 7d ec lea edi, DWORD PTR _vClr$[ebp]
- 00147 a5 movsd
- 00148 a5 movsd
- 00149 a5 movsd
-
- ; 135 : pfxColor->SetVector("vClr", (D3DXVECTOR4*)&vClr);
-
- 0014a 8d 4d ec lea ecx, DWORD PTR _vClr$[ebp]
- 0014d 51 push ecx
- 0014e a5 movsd
- 0014f 8b 75 08 mov esi, DWORD PTR _pfxColor$[ebp]
- 00152 8b 06 mov eax, DWORD PTR [esi]
- 00154 68 00 00 00 00 push OFFSET FLAT:??_C@_04JKCKMDGO@vClr?$AA@
- 00159 56 push esi
- 0015a ff 90 88 00 00
- 00 call DWORD PTR [eax+136]
-
- ; 136 : hr = m_pDevice->DrawPrimitive(D3DPT_LINESTRIP,
- ; 137 : m_cSegments * 2 + 2, m_cSegments);
-
- 00160 8b 4b 08 mov ecx, DWORD PTR [ebx+8]
- 00163 8b 03 mov eax, DWORD PTR [ebx]
- 00165 8b 10 mov edx, DWORD PTR [eax]
- 00167 51 push ecx
- 00168 8d 4c 09 02 lea ecx, DWORD PTR [ecx+ecx+2]
- 0016c 51 push ecx
- 0016d 6a 03 push 3
- 0016f 50 push eax
- 00170 ff 92 44 01 00
- 00 call DWORD PTR [edx+324]
-
- ; 138 : pfxColor->EndPass();
-
- 00176 8b 06 mov eax, DWORD PTR [esi]
- 00178 56 push esi
- 00179 ff 90 10 01 00
- 00 call DWORD PTR [eax+272]
- 0017f ff 45 0c inc DWORD PTR _iPass$[ebp]
- 00182 8b 45 0c mov eax, DWORD PTR _iPass$[ebp]
- 00185 3b 45 fc cmp eax, DWORD PTR _cPasses$[ebp]
- 00188 0f 82 23 ff ff
- ff jb $L56411
- $L56298:
-
- ; 139 : }
- ; 140 :
- ; 141 : pfxColor->End();
-
- 0018e 8b 06 mov eax, DWORD PTR [esi]
- 00190 56 push esi
- 00191 ff 90 14 01 00
- 00 call DWORD PTR [eax+276]
- 00197 5f pop edi
- 00198 5e pop esi
-
- ; 142 :
- ; 143 : return S_OK;
-
- 00199 33 c0 xor eax, eax
- 0019b 5b pop ebx
-
- ; 144 : }
-
- 0019c c9 leave
- 0019d c2 08 00 ret 8
- ?Draw@CShowArcball@@QAEJPAUID3DXEffect@@K@Z ENDP ; CShowArcball::Draw
- _TEXT ENDS
- END
-